package com.itboy.mall.wms.warepurchase.service;

import com.itboy.mall.wms.warepurchase.domain.MallWarePurchase;
import com.itboy.mall.wms.warepurchase.vo.MallWarePurchaseVo;
import com.itboy.mall.wms.warepurchase.bo.MallWarePurchaseQueryBo;
import com.itboy.mall.wms.warepurchase.bo.MallWarePurchaseAddBo;
import com.itboy.mall.wms.warepurchase.bo.MallWarePurchaseEditBo;
import com.itboy.common.core.mybatisplus.core.IServicePlus;
import com.itboy.common.core.page.TableDataInfo;

import java.util.Collection;
import java.util.List;

/**
 * 采购信息Service接口
 *
 * @author itboy
 * @date 2021-08-10
 */
public interface IMallWarePurchaseService extends IServicePlus<MallWarePurchase> {
	/**
	 * 查询单个
	 * @return
	 */
	MallWarePurchaseVo queryById(Long id);

	/**
	 * 查询列表
	 */
    TableDataInfo<MallWarePurchaseVo> queryPageList(MallWarePurchaseQueryBo bo);

	/**
	 * 查询列表
	 */
	List<MallWarePurchaseVo> queryList(MallWarePurchaseQueryBo bo);

	/**
	 * 根据新增业务对象插入采购信息
	 * @param bo 采购信息新增业务对象
	 * @return
	 */
	Boolean insertByAddBo(MallWarePurchaseAddBo bo);

	/**
	 * 根据编辑业务对象修改采购信息
	 * @param bo 采购信息编辑业务对象
	 * @return
	 */
	Boolean updateByEditBo(MallWarePurchaseEditBo bo);

	/**
	 * 校验并删除数据
	 * @param ids 主键集合
	 * @param isValid 是否校验,true-删除前校验,false-不校验
	 * @return
	 */
	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);

	/**
	 * 查询未分配的采购单
	 * @return
	 */
	List<MallWarePurchase> unreceive();

	/**
	 * 保存分配人员
	 * @param bo
	 * @return
	 */
	Boolean updateAssignWarePurchase(MallWarePurchaseEditBo bo);

	/**
	 * 领取采购单
	 * @param bo
	 * @return
	 */
	Boolean receivePurchase(MallWarePurchaseEditBo bo);

	/**
	 * 完成采购单
	 * @param bo
	 * @return
	 */
	Boolean finishPurchaseOrder(MallWarePurchaseEditBo bo);
}
